home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / displytl / globals.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  4.0 KB  |  125 lines

  1. /*
  2.  * Copyright (c) 1990, 1991, 1992 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23. /* $Header: /Source/Media/collab/DisplayTool/RCS/globals.c,v 1.2 92/10/29 17:55:14 drapeau Exp $ */
  24. /* $Log:    globals.c,v $
  25.  * Revision 1.2  92/10/29  17:55:14  drapeau
  26.  * Minor adjustments to functions responsible for creating and painting the
  27.  * popup canvases used when displaying an image full-size.  The problem occurred
  28.  * when a slide contained multiple images to be drawn: the result was that the
  29.  * same image would be drawn in each of the full-sized canvases, instead of each
  30.  * separate image being drawn in the separate canvases.
  31.  * 
  32.  * Revision 1.1  92/10/29  13:57:23  drapeau
  33.  * Initial revision
  34.  *  */
  35. static char dtGlobals[] = "$Header: /Source/Media/collab/DisplayTool/RCS/globals.c,v 1.2 92/10/29 17:55:14 drapeau Exp $";
  36.  
  37. #include "DisplayTool.h"
  38.  
  39.  
  40. struct itimerval timer;
  41.  
  42. Xv_singlecolor colors[] = {
  43.   { 255,   0,   0 },  /* red */
  44.   {   0, 255,   0 },  /* green */
  45.   {   0,   0, 255 },  /* blue */
  46. };  
  47.  
  48. Cms cms;
  49. int cmsSize = 3;
  50. unsigned long *pixelValues;
  51.  
  52. /*
  53.  * Instance XV_KEY_DATA key.  An instance is a set of related
  54.  * user interface objects.  A pointer to an object's instance
  55.  * is stored under this key in every object.  This must be a
  56.  * global variable.
  57.  */
  58. Attr_attribute    INSTANCE;
  59. DisplayTool_baseWindow_objects        *baseWindow;
  60. DisplayTool_infoPopup_objects          *infoPopup;
  61. DisplayTool_resizePopup_objects          *resizePopup;
  62. DisplayTool_helpPopup_objects         *helpPopup;
  63. DisplayTool_slidePopup_objects        *slidePopup;
  64. DisplayTool_slideNumberPopup_objects  *slideNumberPopup;
  65.  
  66. char    *canonFilename;
  67.  
  68. /*
  69.  *  global variables
  70.  */
  71. char      *input_file;
  72. FILE      *fp;
  73. Scrollbar galleryScrollbar;
  74. Scrollbar slidesScrollbar;
  75. Window    galleryWin;
  76. Window    slidesWin;
  77. Display   *display;
  78. Colormap  galleryCmap;
  79. Colormap  slidesCmap;
  80. IconData  iconData;
  81. Frame     globalPopup[MaxNumImages];
  82. Canvas    globalCanvas[MaxNumImages];
  83. Frame     oldPopups[MaxNumImages];
  84. Canvas    oldCanvases[MaxNumImages];
  85. XGCValues gcvalues;
  86. IMAGE     dtImage    [MaxNumImages];
  87. IMAGE     gallery    [MaxNumImages];
  88. IMAGE     clipboardImage[MaxNumImages];
  89. SCR       slide        [MaxNumSlides];
  90.  
  91. int numGalleryImages     = 0;
  92. int numSlidesImages      = 0;
  93. int numClipboardImages   = 0;
  94. int selectedGalleryImage = None;
  95. int selectedSlideImage   = None;
  96. int selectedSlide        = 0;
  97. int oldSelectedSlide     = 0;
  98. int previousSlide        = 0;
  99. int largeFactor          = 6;
  100. int slideSize            = Small;
  101. int beginDoubleBuffer    = 1;      /* reset this to 1 whenever you get the OpenDoc message */
  102. int changes              = False;
  103. int popupTot             = 0;
  104. int oldPopupTot          = 0;
  105. int dontCheckGeometry    = 0;
  106. int performing           = 0;
  107. int pauseMode            = 0;
  108. int timeCount            = 0;
  109. int borderOffset;
  110. int imagesPerRow;
  111. int numSlides;
  112. int            printDiags    = 0;
  113. int            cmap[NumColors];
  114. Xv_font         listFont; 
  115. char            currentFilename[MAXPATHLEN];
  116. char            dummy[MAXPATHLEN];
  117. char            diagString[MAXPATHLEN];
  118. Attr_attribute        canvasKeyData;
  119.  
  120.  
  121. Sender* sender;
  122. Receiver* receiver;
  123. Port senderPort;
  124. int ReceiverPortNumber;
  125.